<div class="widget">
	<div class="widget-header bg-blue">
		<i class="widget-icon icon-notebook"></i> 
		<span class="widget-caption"> 编辑教室 </span>
		<div class="widget-buttons">
			<a href="javascript:void(0);" onclick="handlerCancel(this);" title="关闭"
				 data-toggle="dispose" data-refresh-table="#table-room"> <i class="fa fa-times"></i> </a> 
		</div>
	</div>
	<div class="widget-body">
		<!-- TODO 基本信息 -->
		<div class="widget radius-bordered mgbt-xs-10">
			<div class="widget-header">
				<i class="widget-icon icon-notebook"></i> 
				<span class="widget-caption"> 基本信息 </span>
			</div>
			<div class="widget-body editor-body-sm editor-body-room">
				
			</div>
		</div>
	</div>
</div>

<!-- 提交表单 ========================================================= -->
<form id="editor-form-room" action="/miwawa/{dbname}/common/update" method="post" 
			name="com.app.miwawa.api.eam.entity.Room">
			<input type="hidden" name="bean['status']" value="0">
			<input type="hidden" name="bean['invalid']" value="F">
</form>
    
<script type="text/javascript">
	jQuery(function() {
		initDate();
	});
	
	function initDate(){
		var room = jQuery("#table-room").data("selectedRow");
		
		jQuery(".editor-body-room").loadform("load", {
			templateId: "#view-room-template",
			templatePath: "/miwawa/content/eam/room/template.html",
			templateData: room,
			templateHelper: {
				"chosen":function(value){
					require(['jquery.plugin.form'], function(form){
						form.chosen("#type").select("#type",{
							url: "/miwawa/default/common/select.json",
							querys: {"pcode_EQ": "c_contract_type"}
						},function(chosen){
							jQuery("option[value='"+value+"']",chosen).attr("selected","selected").trigger('chosen:updated');
						});
					});
				}
			}
		});
		
		require(['jquery.plugin.form'],function(form){
			form.tooltip("[data-toggle='tooltip']");
		});
	}
</script>